﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Default.Master" Inherits="System.Web.Mvc.ViewPage<WebStickyNotes.Models.EditTaskDetailModel>" %>
<%@ Import Namespace="WebStickyNotes.Helpers" %>
<%@ Import Namespace="WebStickyNotes.Resources" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%= Labels.PageTitleEditTask %>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <% using (Html.BeginForm()) {%>
        <fieldset>
            <legend><%= Labels.PageTitleEditTask %></legend>
            <% Html.RenderPartial("Message", Model.Message); %>
            <%= Html.HiddenFor(model => model.Task.Id) %>
            <p>
                <label><%= Labels.Title %><br>
                <%= Html.TextBoxFor(model => model.Task.Title, new { style = "width: 30em;" }) %></label>
                <%= Html.ValidationMessageFor(model => model.Task.Title) %>
            </p>
            <p>
                <label><%= Labels.Description %><br>
                <%= Html.TextAreaFor(model => model.Task.Description) %></label>
                <%= Html.ValidationMessageFor(model => model.Task.Description) %>
            </p>
            <p>
                <label><%= Labels.TaskStream %><br>
                <%= MegaSelectListHelper.DropDownList("Task.TaskStreamId", new MegaSelectList(Model.TaskStreams, "Id", "TaskProjectTitle", "Title", Model.Task.TaskStreamId)) %>
                <%= Html.ValidationMessageFor(model => model.Task.TaskStreamId) %>
            </p>
            <p>
                <label><%= Labels.TaskPerson %><br>
                <%= Html.DropDownListFor(model => model.Task.TaskPersonId, new SelectList(Model.TaskPeople, "Id", "Email", Model.Task.TaskPersonId)) %></label>
                <%= Html.ValidationMessageFor(model => model.Task.TaskPersonId) %>
            </p>
            <p>
                <label><%= Labels.TaskPriority %><br>
                <%= Html.DropDownListFor(model => model.Task.TaskPriorityId, new SelectList(Model.TaskPriorities, "Id", "Title", Model.Task.TaskPriorityId)) %></label>
                <%= Html.ValidationMessageFor(model => model.Task.TaskPriorityId) %>
            </p>
            <p>
                <label><%= Labels.Release %><br>
                <%= Html.TextBoxFor(model => model.Task.Release) %></label>
                <%= Html.ValidationMessageFor(model => model.Task.Release) %>
            </p>
            <p>
                <label><%= Labels.TotalEffort %><br />
                <%= Html.TextBoxFor(model => model.Task.TotalEffort) %></label>
                <%= Html.ValidationMessageFor(model => model.Task.TotalEffort)%>
            </p>
            <p>
                <label><%= Labels.PercentageComplete %><br>
                <%= Html.TextBoxFor(model => model.Task.PercentageComplete) %></label>
                <%= Html.ValidationMessageFor(model => model.Task.PercentageComplete) %>
            </p>
            <p>
                <label><%= Labels.MilestoneDate %><br>
                <%= Html.TextBoxFor(model => model.Task.MilestoneDate, new { @class = "datepicker", value = Model.Task.MilestoneDate.ToString("dd/mm/yyyy") }) %></label>
                <%= Html.ValidationMessageFor(model => model.Task.MilestoneDate) %>
            </p>
            <p>
                <input type="submit" value="Save" />
            </p>
        </fieldset>
    <% } %>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
</asp:Content>